<?php

namespace Admin\Controller;
use Think\Controller;

class CommenController extends Controller{
	public function _initialize(){
		if(empty($_SESSION['fix_user'])){
			$this->display('Login/index');
			exit;
		}else{
		$user = M('user');
		$data = $_SESSION;
		$id = $_SESSION['fix_user']['id'];
		
		$m = $user -> where("id =$id")->find();
		//dump($m);
		if($m['power'] < 1){
    		$this ->error('您的权限不能进入后台',U('login/index'));
    	}
	}

}
}